<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>jquery</title>
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    <link href="//unpkg.com/layui@2.9.8/dist/css/layui.css" rel="stylesheet">
    <script src="//unpkg.com/layui@2.9.8/dist/layui.js"></script>
</head>

<body>
    <div></div>
    <table class="layui-hide" id="ID-table-demo-data"></table>

    <script>
        $("div").html({{ msg| tojson }});

        $("div").find("header").hide();
        $("div").find("aside").hide();
        $("div").find(".footx").hide();
        $("div").find("#divull").hide();
        $("div").find(".neirong-n").hide();
        $("div").find("#divu11").hide();

        let data = []

        var li = $(".m_new1 ul li")
   
        // let nuws = {username}
        li.each(function (index, element) {
            console.log(index, element);
        });


        layui.use('table', function () {
            var table = layui.table;

            // 已知数据渲染
            var inst = table.render({
                elem: '#ID-table-demo-data',
                toolbar: 'default',
                height: 315,
                cols: [[ //标题栏

                    { field: 'username', title: '序号', width: 500 },
                    { field: 'age', title: '时间', width: 500 },
                    { field: 'sex', title: '标题', width: 550 },


                ]],
                data: [{ // 赋值已知数据

                    "username": "张三1",

                    "age": "18",
                    "sex": "男",

                }],
                //skin: 'line', // 表格风格
                //even: true,
                page: true, // 是否显示分页
                limits: [5, 10, 15],
                limit: 5 // 每页默认显示的数量
            });
        });
    </script>

</body>

</html>